/**
 * createTime: 2018/4/17 10:34
 * author: zhibin.zhao
 * description:
 */
/*function getSomething() {
    return 'someting';
}
async function testAsync() {
    return 'Hello async'
}
async function test() {
    const v1 = await getSomething();
    const v2 = await testAsync();
    console.log(v1, v2);
}*/
// await :async wait
/*
const result = testAsync();
console.log(result);*/
// test();
function takeLongTime() {
    return new Promise(resolve => {
        setTimeout(()=>resolve("long_time_value"), 2000);
    });
}

async function test() {
    const v = await takeLongTime();
    console.log(v);
}
test();